package com.zhanghe.chap02;

import java.io.IOException;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import com.zhanghe.annnation.NotThreadSafe;
/**  
 * UnSafeCountingFactorizer
 *   
 * @author Clevo  
 * @date 2017/12/26 0:15 
 */  
@NotThreadSafe
public class UnSafeCountingFactorizer implements Servlet{

	private long count = 0;
	
	@Override
	public void service( ServletRequest req ,ServletResponse res ) throws ServletException, IOException {
		++count;
	}
	
	@Override
	public void init( ServletConfig config ) throws ServletException {
		
	}

	@Override
	public ServletConfig getServletConfig() {
		return null;
	}

	@Override
	public String getServletInfo() {
		return null;
	}

	@Override
	public void destroy() {
		
	}

}
